home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 027a / lxnet.zip / LX.DOC next >
Text File  |  1991-02-07  |  67KB  |  2,057 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.      LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper
  15.  
  16.                         Copyright 1990 Randy Proulx.
  17.                         1618 Marion Rd. SE #47
  18.                         Rochester, MN 55904
  19.  
  20. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper      i
  21.  
  22.  
  23.  
  24.                     Table of Contents
  25.  
  26.        License Information . . . . . . . . . . . . 1
  27.  
  28.        How to use this library . . . . . . . . . . 2
  29.  
  30.        Features and limitations. . . . . . . . . . 3
  31.  
  32.        Function Descriptions . . . . . . . . . . . 5
  33.  
  34.            A_Connect() . . . . . . . . . . . . . . 5
  35.  
  36.            A_Groups(). . . . . . . . . . . . . . . 6
  37.  
  38.            A_Members() . . . . . . . . . . . . . . 7
  39.  
  40.            A_Queues(), . . . . . . . . . . . . . . 8
  41.  
  42.            A_Servers() . . . . . . . . . . . . . . 9
  43.  
  44.            A_Users() . . . . . . . . . . . . . . .10
  45.  
  46.            A_Volumes() . . . . . . . . . . . . . .11
  47.  
  48.            Acct_stat() . . . . . . . . . . . . . .12
  49.  
  50.            Attach(). . . . . . . . . . . . . . . .13
  51.  
  52.            Cancel_Cap(). . . . . . . . . . . . . .15
  53.  
  54.            CanSpecCap(). . . . . . . . . . . . . .16
  55.  
  56.            Cap_Flags() . . . . . . . . . . . . . .17
  57.  
  58.            Cap_Server(). . . . . . . . . . . . . .18
  59.  
  60.            Cap_Status(). . . . . . . . . . . . . .19
  61.  
  62.            Capture() . . . . . . . . . . . . . . .20
  63.  
  64.            ConnectNum(). . . . . . . . . . . . . .21
  65.  
  66.            Cur_Drive() . . . . . . . . . . . . . .22
  67.  
  68.            Cur_Vol() . . . . . . . . . . . . . . .23
  69.  
  70.            DefaultLpt(). . . . . . . . . . . . . .24
  71.  
  72.            DefaultCon(). . . . . . . . . . . . . .25
  73.  
  74.            Detach(). . . . . . . . . . . . . . . .26
  75.  
  76.            EndCap(). . . . . . . . . . . . . . . .27
  77.  
  78.            EndSpecCap(). . . . . . . . . . . . . .28
  79.  
  80.            Flushcap(). . . . . . . . . . . . . . .29
  81.  
  82.  
  83. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     ii
  84.  
  85.  
  86.  
  87.                     Table of Contents
  88.                        (continued)
  89.  
  90.            FluSpecCap(). . . . . . . . . . . . . .30
  91.  
  92.            GetBanUser(). . . . . . . . . . . . . .31
  93.  
  94.            GetLogCont(). . . . . . . . . . . . . .32
  95.  
  96.            GetMap(). . . . . . . . . . . . . . . .34
  97.  
  98.            GetObjID(). . . . . . . . . . . . . . .35
  99.  
  100.            GetObjName(). . . . . . . . . . . . . .36
  101.  
  102.            GetObjType(). . . . . . . . . . . . . .37
  103.  
  104.            GetRights() . . . . . . . . . . . . . .38
  105.  
  106.            GetUser() . . . . . . . . . . . . . . .39
  107.  
  108.            IsInGroup() . . . . . . . . . . . . . .40
  109.  
  110.            IsNovell(). . . . . . . . . . . . . . .41
  111.  
  112.            Login() . . . . . . . . . . . . . . . .42
  113.  
  114.            Logout(). . . . . . . . . . . . . . . .43
  115.  
  116.            Map() . . . . . . . . . . . . . . . . .44
  117.  
  118.            NumConnect(). . . . . . . . . . . . . .45
  119.  
  120.            NumGroups() . . . . . . . . . . . . . .46
  121.  
  122.            NumMembers(). . . . . . . . . . . . . .47
  123.  
  124.            NumQueues() . . . . . . . . . . . . . .48
  125.  
  126.            NumServers(). . . . . . . . . . . . . .49
  127.  
  128.            NumSList(). . . . . . . . . . . . . . .50
  129.  
  130.            NumUsers(). . . . . . . . . . . . . . .51
  131.  
  132.            NumVolumes(). . . . . . . . . . . . . .52
  133.  
  134.            SecurEquiv(). . . . . . . . . . . . . .53
  135.  
  136.            Send(). . . . . . . . . . . . . . . . .54
  137.  
  138.            ServDate(). . . . . . . . . . . . . . .56
  139.  
  140.            ServTime(). . . . . . . . . . . . . . .57
  141.  
  142.            SetDefCon() . . . . . . . . . . . . . .58
  143.  
  144.  
  145. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper    iii
  146.  
  147.  
  148.  
  149.                     Table of Contents
  150.                        (continued)
  151.  
  152.  
  153.            SetDefLPT() . . . . . . . . . . . . . .59
  154.  
  155.            SList() . . . . . . . . . . . . . . . .60
  156.  
  157.            UserName(). . . . . . . . . . . . . . .61
  158.  
  159.            WhoAmI(). . . . . . . . . . . . . . . .62
  160.  
  161.  
  162. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper      1
  163.  
  164.  
  165. License Information
  166.  
  167.  
  168. **NOTE  This documentation is for both LXNet (Summer 87) and LXNet5
  169.         (5.0).  Please note that each function will tell whether the
  170.         function works with Summer 87, all will work with 5.0.
  171.         LXNet (Summer 87) is shareware, LXNet5 (5.0) is not.  LXNet
  172.         can be found on NANFORUM in lib 17 or lib 3.  See below to
  173.         order LXNet5.
  174.  
  175. COPYRIGHT NOTICE
  176.  
  177. LXNet.lib is copyrighted, and all rights are reserved.  It is being released
  178. as shareware.  It may be tested, copied, uploaded to public access bulletin
  179. boards, and distributed in any manner where the recipient pays for no more
  180. than the cost of the distribution.  All original files must be included.
  181. LXNet may not be bundled with any other programs, libraries, or functions
  182. without the written permission of the author.
  183.  
  184. LXNet5.lib is copyrighted, and all rights are reserved.  It is NOT
  185. shareware.  It is licensed to the user for a period of 20 years and
  186. may not be used on more than one computer at a time.  There are no
  187. royalties due for any programs written using LXNet5.  LXNet5 may not
  188. be dis-assembled, un-compiled, or reversed engineered.  You may not
  189. include any portion of LXNet5.lib in any software not in it's final
  190. form (.EXE).
  191.  
  192. RESTRICTIONS
  193.  
  194. LXNet functions may not be used in any application, for other than testing
  195. purposes, by unregistered users.  They may not be included in any application
  196. that is in its final form, without registration.
  197.  
  198. DISCLAIMER
  199.  
  200. No guarantee of any kind is made in regards to these functions.
  201.  
  202. REGISTRATION
  203.  
  204. Use of LXNet may be registered by sending Twentyfive dollars to its author.
  205. Any registered user may include the LXNet functions in any of his or her
  206. applications that are for personal or corporate use, or that are distibuted
  207. as .EXE applications.  They are also entitled to make use of any upgrades
  208. to the LXNet functions that are publicly available as shareware within
  209. 24 months of their original registration.
  210.  
  211. Note that registration does not provide the right to include LXNet
  212. functions as part of any library of functions.  Registration provides the
  213. right to include LXNet functions only in applications distributed as .EXE
  214. files.
  215.  
  216. To register LXNet, send $25.00 to: Randy Proulx
  217.                        1618 Marion Rd. SE #47
  218.                        Rochester, MN  55904
  219.             
  220.    **NOTE While LXNet.lib is shareware, LXNet5.lib is not.  LXNet5.lib
  221.      can be pruchased by sending $99.00 +5.00 shipping to:
  222.  
  223.               Randy Proulx
  224.               1618 Marion RD SE #47
  225.               Rochester, MN 55904
  226.  
  227.      or
  228.         using MasterCard/Visa call 1-507-280-6968
  229.  
  230.  
  231.  
  232.  
  233.  
  234. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper      2
  235.  
  236. How to use this library
  237.    Two versions of this library are included.  LXNet.lib is S87
  238.    compatible while LXNet5.lib is 5.0 compatible.  LXNet5 has
  239.    a quite a few enhancments and added functions.  Under each
  240.    function description, differences are noted and different
  241.    examples are included where there may be a difference.
  242.  
  243.  
  244.    S87:
  245.    This library needs no setup or special instructions.  All you have
  246.    to do is include LXNet in you LIB or SEARCH parameters for PLINK.
  247.    If you don't use PLINK, you will have to follow the instructions for
  248.    your linker for adding libraries.
  249.  
  250.    5.0:
  251.    To use LXNet5, you must add the line:
  252.          #include "lxnet.ch"  (lxnet.ch should be in your include path
  253.                                directory)
  254.    to your program.  No special initialization functions are needed and
  255.    there are no special link instructions, just add LXNet5 to your library
  256.    list.
  257.  
  258.    If you have any questions or request, I'm can be found on compuserve
  259.    user id [71621,3263]
  260.  
  261.  
  262.  
  263.  
  264. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper      3
  265.  
  266. Future Features, Current Limitations and Version History
  267.    These function will only work on Novell Networks, I have no idea what
  268.    would happen on another network operating system.  This Library has been 
  269.    tested with Novell Netware V2.12.  It should work with all Netware 
  270.    versions 2.0 and later (with the exception of some queue option and the
  271.    capture command on 2.0a servers) since the system calls are the same.
  272.    LXNet5 is designed for Clipper 5.0 while LXNet is designed for S87.
  273.    
  274.    Changes from 1.0 (CLPNET)
  275.       Printing functions were added including Capture(), EndCap(), 
  276.       FlushCap(), EndSpecCap(), FlushSCap(), CancelCap(), CanSpecCap(),
  277.       DefaultLPT(), GetBanUser(), A_Queues(), NumQueues().
  278.  
  279.       A_Servers() and NumServers() were added.
  280.  
  281.       IsNovell() was added.
  282.  
  283.       Problem in A_Members was fixed.  The problem caused A_Members to
  284.       return scambled user ids.
  285.  
  286.    Changes from 1.1 LXNet (9-24-90)
  287.       Multiple server functions were added including DefaultCon() and
  288.       SetDefCon().
  289.  
  290.       A_Volume() and NumVolumes() were added to get volume names.
  291.  
  292.       UserName() was added to get the full user name.
  293.  
  294.       ServTime() and ServDate() were added to get the server date and time.
  295.  
  296.       Bug in IsNovell was fixed.  This was called by many internals and
  297.       may have caused many functions to not work.
  298.  
  299.    Additional 5.0 functions
  300.       GetLogCont() was added to get login control parameters.
  301.  
  302.       Acct_Stat() was added to get accounting information.
  303.  
  304.       Map() was added to set drive mapping
  305.  
  306.       GetMap() was added to get drive mapping
  307.  
  308.       SList() was added to get list of servers not already attached to.
  309.  
  310.    Changes from 1.2 to 1.3
  311.  
  312.       Addition of Acct_Stat(), Map(), GetMap(), SList(), MapTemp(), 
  313.                and IsTempMap()
  314.  
  315.       Addition of Attach(), Login(), Logout(), A_Connect(), NumConnect(),
  316.                Send(), SetDefLPT(), Cap_Flags(), Cap_Server(), Cap_Status(),
  317.                Cur_Drive(), Cur_Vol(), GetRights(), Detach(), Get_User()
  318.  
  319.       Basically add all the functions supported by the 5.0 version.
  320.  
  321.  
  322. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper      4
  323.  
  324.    Changes from 5.0 to 5.1
  325.  
  326.       Addition of Attach(), Login(), Logout(), A_Connect(), NumConnect(),
  327.                Send(), SetDefLPT(), Cap_Flags(), Cap_Server(), Cap_Status(),
  328.                Cur_Drive(), Cur_Vol(), GetRights(), Detach(), Get_User()
  329.  
  330.  
  331.    
  332.    Future releases will include the following:
  333.  
  334.       A function to caston and castoff (set broadcast mode)
  335.  
  336.       A function to get the Netware version number
  337.  
  338.       Functions to write to the bindery
  339.  
  340.  
  341. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper      5
  342.  
  343. Function    :A_Connect
  344.  
  345. Compatible  :S87,5.0
  346.  
  347. Syntax      :n_var=A_Connect(a_var)
  348.  
  349. Description :A_Connect will fill the array a_var with all valid connection
  350.              numbers and the object names logged into the connection number.  
  351.              Each element is character in the format:CCC UUUUUU... where CCC 
  352.              is the connection number and UUUUUU... is the user name.  To get
  353.              just the connection number, use val(left(a_var[i],3)), to get
  354.              just the username, use right(a_var[i],len(a_var[i])-4).  Only
  355.              connections with an object logged in will be added to the array.
  356.              a_var is sized to the correct size, but must be declared as an
  357.              array.  A_Connect will return the number of valid connections
  358.              found.
  359.  
  360.  
  361. Example     :see Send() for example of A_Connect()
  362.  
  363.  
  364. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper      6
  365.  
  366. Function    :A_Groups
  367.  
  368. Compatible  :S87, 5.0
  369.  
  370. Syntax      :n_var=A_Groups(a_var)
  371.  
  372. Description :A_Groups returns the Novell user groups in the array a_var.
  373.  
  374.              S87:
  375.              A_var must be declared and have enough elements to hold all
  376.              the groups.  NumGroups() can be used when declaring a_var
  377.              to set the correct number of elements.
  378.  
  379.              5.0:
  380.              A_var will be sized automatically, it need only be declared
  381.              as an array.  The contents of a_var will be destroyed upon
  382.              entrance to A_Groups.  The 5.0 version will return the number 
  383.              of groups in a_var.
  384.  
  385. Example S87 :public groups[NumGroups()]
  386.              A_Groups(groups)
  387.              for i=1 to NumGroups()
  388.                 ? groups[i]
  389.              next
  390.  
  391. Example 5.0 :private groups[0]
  392.              local numgroups
  393.              numgroups:=A_Groups(groups)
  394.              for i=1 to numgroups
  395.                 ? groups[i]
  396.              next
  397.  
  398.  
  399.  
  400. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper      7
  401.  
  402. Function    :A_Members
  403.  
  404. Compatible  :S87, 5.0
  405.  
  406. Syntax      :nvar:=A_Members(a_var,groupname)
  407.  
  408. Description :A_Members returns all the members of the group groupname in
  409.              the array a_var.  
  410.  
  411.              S87:
  412.              A_var must be declared and have enough elements to hold all 
  413.              the groups.  NumMembers() can be used when declaring a_var 
  414.              to set the correct number of elements.
  415.  
  416.              5.0:
  417.              A_Var is sized automatically, it needs to be declared as an
  418.              array only.  The 5.0 version will return the number of members 
  419.              in a_var.
  420.  
  421. Example S87 :public members[NumMembers('EVERYONE')]
  422.              A_Members(members,'EVERYONE')
  423.              for i=1 to NumMembers('EVERYONE')
  424.                 ? members[i]
  425.              next
  426.  
  427. Example 5.0 :private members[0],n_members
  428.              n_members:=A_Members(members,'EVERYONE')
  429.              for i=1 to n_members
  430.                 ? members[i]
  431.              next
  432.  
  433.  
  434.  
  435. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper      8
  436.  
  437. Function    :A_Queues
  438.  
  439. Compatible  :S87, 5.0
  440.  
  441. Syntax      :n_var=A_Queues(a_var)
  442.  
  443. Description :A_Queues returns all the print queues available on the
  444.              default server in the array a_var.  
  445.  
  446.              S87:
  447.              A_var must be declared and have enough elements to hold all 
  448.              the queues.  NumQueues() can be used when declaring a_var 
  449.              to set the correct number of elements.
  450.  
  451.              5.0:
  452.              A_Var is sized automatically, it needs to be declared as an
  453.              array only.  The 5.0 version will return the number of queues
  454.              in a_var.
  455. Example S87 :public queues[NumQueues()]
  456.              A_Queues(queues)
  457.              for i=1 to NumQueues()
  458.                 ? queues[i]
  459.              next
  460.  
  461. Example 5.0 :private queues[0],n_queues
  462.              n_queues:=A_Queues(queues)
  463.              for i=1 to n_queues
  464.                 ? queues[i]
  465.              next
  466.  
  467.  
  468.  
  469. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper      9
  470.  
  471. Function    :A_Servers
  472.  
  473. Compatible  :S87, 5.0
  474.  
  475. Syntax      :n_var=A_Servers(a_var)
  476.  
  477. Description :A_Servers returns all the server names that the workstation
  478.              is logged into in the array a_var.  The File Server Table 
  479.              will contain the server names in element that the server 
  480.              resides in the Novell Table.  The array may be sparce since 
  481.              the servers may retain their original position if a server 
  482.              has lost connection.
  483.  
  484.              S87:
  485.              A_var must be declared as having 8 elements since the array
  486.              may be sparce.
  487.  
  488.              5.0:
  489.              A_var is sized to 8 elements automatically.  n_var will return
  490.              the actual number of servers in the array.
  491.  
  492.  
  493. Example S87 :public servers[NumServers()]  &&or public servers[8]
  494.              n_servs=A_Servers(servers)
  495.              for i=1 to n_servs
  496.                 if !empty(servers[i])
  497.                    ? servers[i]
  498.                 endif
  499.              next
  500.  
  501. Example 5.0 :private servers[0]
  502.              n_servs=A_Servers(servers)
  503.              for i=1 to n_servs
  504.                 if !empty(servers[i])
  505.                    ? servers[i]
  506.                 endif
  507.              next
  508.  
  509.  
  510. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     10
  511.  
  512. Function    :A_Users
  513.  
  514. Compatible  :S87, 5.0
  515.  
  516. Syntax      :n_var=A_Users(a_var)
  517.  
  518. Description :A_Users fills the array a_var with all the usernames for 
  519.              the default server and returns the number of users in the
  520.              array.
  521.  
  522.              S87:
  523.              a_var must be declared and have enough elements to hold all 
  524.              the users.  NumUsers() can be used when declaring a_var to 
  525.              set the correct number of elements.
  526.  
  527.              5.0:
  528.              a_var need not be sized, A_Users will size the array, a_var
  529.              must be declared as an array.  Any valued in a_var will be
  530.              lost since the array size is set to 0 (using asize()) and
  531.              then each user name is added to the array (using aadd()).
  532.  
  533.  
  534. Example S87 :public users[NumUsers()]
  535.              A_Users(users)
  536.              for i=1 to NumUsers()
  537.                 ? users[i]
  538.              next
  539.  
  540. Example 5.0 :local users[0]
  541.              A_Users(users)
  542.              for i:=1 to len(users)
  543.                 ? users[i]
  544.              next
  545.  
  546. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     11
  547.  
  548. Function    :A_volumes
  549.  
  550. Compatible  :S87, 5.0
  551.  
  552. Syntax      :A_volumes(a_var)
  553.  
  554. Description :A_volumes returns all the volume names for the default server.
  555.  
  556.              S87:
  557.              A_var must be declared and have enough elements to hold all 
  558.              the volumes.  NumVolumes() can be used when declaring a_var to 
  559.              set the correct number of elements.
  560.  
  561.              5.0:
  562.              A_Var is sized automatically, it needs to be declared as an
  563.              array only.  The 5.0 version will return the number of volumes
  564.              in a_var.
  565.  
  566. Example S87 :public volumes[NumVolumes()]
  567.              A_Volumes(volumes)
  568.              for i=1 to NumVolumes()
  569.                 ? volumes[i]
  570.              next
  571.  
  572. Example 5.0 :private volumes[0],n_vols
  573.              n_vols:=A_Volumes(volumes)
  574.              for i=1 to n_vols
  575.                 ? volumes[i]
  576.              next
  577.  
  578.  
  579. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     12
  580.  
  581. Function    :Acct_Stat
  582.  
  583. Compatible  :S87,5.0
  584.  
  585. Syntax      :nvar=Acct_Stat(ObjectName,;         /*charact*/
  586.                             ObjectType,;         /*numeric*/
  587.                             @AcctBal,;           /*numeric*/
  588.                             @CredLimit,;         /*numeric*/
  589.                             HoldServersArray,;   /*array  */
  590.                             HoldAmountsArray)    /*array  */
  591.  
  592. Description :Acct_Stat returns the current accounting status of an object.
  593.              Acct_Stat returns 5 if the objectname and/or the objecttype
  594.              are not of the correct type or 2 if an error occurs reading
  595.              the accounting property.  An error reading the accounting
  596.              property can result from the accounting not being installed,
  597.              or the logged-in object does not have bindery read rights.
  598.              Read rights include the object logged in (you can only get
  599.              or own account balance) or supervisor equivalence.
  600.              Acct_Stat will store values into AcctBal (current account
  601.              balance), CredLImit (credit limit, 8000000h if no limit),
  602.              the servers that have placed holds on the account and the
  603.              amounts those servers are holding.  The hold amount refer
  604.              to upcoming services that have requested reserving an
  605.              amount that will be subtracted from the account balance when
  606.              the particular service is complete.  This is to ensure that
  607.              the account will have enough credit to pay for the service
  608.              before the service is complete.  Each server will hold one
  609.              amount for all pending services on that server.
  610.  
  611.  
  612. Example     :
  613. function useracctba
  614.    private acctbal,credlim,a_status
  615.    acctbal=0
  616.    credlim=0
  617.    a_status=acct_stat(users[pcurrow],USER_OBJECT,@acctbal,@credlim)
  618.    @ 8,15,10,65 box  '╔═╗║╣═╠║ '
  619.    @ 10,15,14,65 box '╠═╣║╝═╚║ '
  620.    @ 9,16 say 'Account Balance For User '+users[pcurrow]
  621.    @ 11,17 say 'Account Balance :'
  622.    @ 12,17 say 'Allow Unlimited Credit:'
  623.    @ 13,17 say 'Low Balance Limit:'
  624.    @ 11,50 say acctbal picture '9999999999'
  625.    @ 12,50 say if(dec2hex(credlim)='80000000','Yes','No')
  626.    @ 13,50 say if(dec2hex(credlim)='80000000','',;
  627.                   transform(credlim,'9999999999'))
  628.    @ 15,50 say dec2hex(credlim)
  629.    wait ''
  630. return .t.
  631.  
  632.  
  633. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     13
  634.  
  635. Function    :Attach
  636.  
  637. Compatible  :S87,5.0
  638.  
  639. Syntax      :n_var=Attach(ServerName)
  640.  
  641. Description :Attach will establish a connection to the server ServerName
  642.              allowing the workstation to login to that server.  A note on 
  643.              server and connection numbers is needed here.
  644.  
  645.              A workstation shell has a connection ID table that
  646.              will hold the internetwork address and connection ID for
  647.              each of upto eight servers that it is attached to.  The
  648.              server from which the login script is run is designated as
  649.              the primary server.  Other servers attached later on may
  650.              be designated as a perferred server (see SetDefCon).
  651.              Operations are always performed on the preferred server 
  652.              unless another server is specified (ie. Map, login, capture,
  653.              etc.).  Attaching a server using Attach() will only
  654.              add the server to the connection ID table, this is different
  655.              from Novell's ATTACH command which also makes you log into the
  656.              file server.  After using Attach(), you should login into the
  657.              server using Login().  A list of all servers is kept in the 
  658.              primary servers bindery under the object type FILE_S_OBJECT.  
  659.              SList() will load an array with these values less any server 
  660.              found in the connection ID table.  A_Servers will load an 
  661.              array with the servers in the connection ID table.
  662.  
  663.              Attach() will return either the server slot number (1-8) or an
  664.              error code (>8).  Error codes are as follows:
  665.  
  666.                      249 = Error reading property value for server
  667.                     *250 = Already attached to server
  668.                      251 = No Free connections slots at server
  669.                      252 = No more server slots
  670.                      253 = Unknown file server
  671.                      254 = Server bindery locked
  672.                      255 = No response from server
  673.  
  674.              *If you try to attach to a server already in the connection ID
  675.               table, Attach() will return the server # of that server, so
  676.               you should never receive error 250
  677.  
  678.  
  679.              The server number returned should be set as the preferred
  680.              connection (SetDftCon()) when any operation you wish is to
  681.              be performed on that server.  You may also get the server
  682.              number by scanning an array loaded with A_Servers() for the
  683.              server name.
  684.  
  685.  
  686.  
  687. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     14
  688.  
  689. Function:Attach (continued)
  690.  
  691. Example     :#include "lxnet.ch"  &&5.0 only
  692.              function my_login
  693.                 parameters servername,username,password
  694.                 private server_num,old_server,flag
  695.                 private user_object   &&S87 only
  696.                 user_object=1         &&S87 only
  697.                 flag=.t.
  698.                 password=if(type('password')='U','',password)
  699.                 server_num=attach(servername)
  700.                 if server_num<9
  701.                    old_server=defaultcon()
  702.                    setdefcon(server_num)
  703.                    if !login(username,password,USER_OBJECT)  &&
  704.                       popmess(10,10,'Login failed')
  705.                       flag=.f.
  706.                    endif
  707.                    setdefcon(old_server)  &&restore old server as default
  708.                 else
  709.                    popmess(10,10,'Login failed')
  710.                    flag=.f.
  711.                 endif
  712.              return flag
  713.  
  714.  
  715. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     15
  716.  
  717. Function    :Cancel_Cap
  718.  
  719. Compatible  :S87, 5.0
  720.  
  721. Syntax      :Cancel_Cap()
  722.  
  723. Description :Cancel_Cap cancels the capture in progress for the default
  724.              LPT printer port.  Any output not already printed will be
  725.              removed from the queue.
  726.  
  727.  
  728. Example     :capture('/q=myqueue /ti=0 /nb /nt')
  729.              set device to print
  730.              &&report begins
  731.              .
  732.              .  user presses <ESC> to cancel report 
  733.              .  and set cancel_report to .t.
  734.              .
  735.              if cancel_report
  736.                 cancel_cap()
  737.              else
  738.                 endcap()
  739.              endif
  740.              set device to screen
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     16
  748.  
  749. Function    :CanSpecCap
  750.  
  751. Compatible  :S87, 5.0
  752.  
  753. Syntax      :CanSpecCap(lptport)
  754.  
  755. Description :CanSpecCap cancels the capture in progress for the specified
  756.              LPT printer port.  Any output not already printed will be
  757.              removed from the queue.  lptport can have the values of 1, 2,
  758.              or 3 for ports LPT1, LPT2, or LPT3.
  759.  
  760.  
  761. Example     :capture('/q=myqueue /ti=0 /nb /nt /l=2')  
  762.                                  && /l=2 will set capture to for LPT2
  763.              set device to print
  764.              set printer to LPT2  &&tells Clipper to use LPT2
  765.              &&report begins
  766.              .
  767.              .  user presses <ESC> to cancel report 
  768.              .  and set cancel_report to .t.
  769.              .
  770.              if cancel_report
  771.                 CanSpecCap(2)
  772.              else
  773.                 EndSpecCap(2)
  774.              endif
  775.              set device to screen
  776.              set printer to
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     17
  784.  
  785. Function    :Cap_Flags
  786.  
  787. Compatible  :S87,5.0
  788.  
  789. Syntax      :l_var=Cap_Flags(LPT_Port,;            /*numeric    */
  790.                               @Queue_Name,;         /*character  */
  791.                               @Server_Name,;        /*chatracter */
  792.                               @FormFeed,;           /*logical    */
  793.                               @No_Tab_Conversion,;  /*logical    */
  794.                               @Print_Banner,;       /*logical    */
  795.                               @Tab_Conv_Size,;      /*numeric    */
  796.                               @Server_Printer,;     /*numeric    */
  797.                               @Copies,;             /*numeric    */
  798.                               @Form_Number,;        /*numeric    */
  799.                               @Banner_Text,;        /*character  */
  800.                               @LPT_Captured,;       /*numeric    */
  801.                               @Time_Out_Seconds,;   /*numeric    */
  802.                               @Auto_End_Cap,;       /*logical    */
  803.                               @Form_Name)           /*character  */
  804.  
  805. Description :Cap_Flags is used to get the current capture characteristics
  806.              of the specified LPT port.  If no capture is active, the last
  807.              values used are returned.  Queue_Name will return a zero length
  808.              string if no queue name was specified for the capture (only a
  809.              server printer # was specified).  If No_Tab_Conversion is .t.,
  810.              Tab_Conv_Size has no meaning.  If Print_Banner is .f.,
  811.              Banner_Text has no meaning.   LPT_Captured should return the
  812.              same value as LPT_Port.  The rest of the parameters are
  813.              self explanitory.  Cap_Flags will return .t. unless LPT_Port
  814.              is not numeric.  
  815.  
  816.         **   All parameter (with the exception of LPT_Port) are optional, 
  817.              but any parameter requested must be initialized to a value.
  818.              This is because Clipper cannot tell the difference between a
  819.              parameter that has been skipped and one that has not been
  820.              initialized (both have a value of NIL).  Parameters may be 
  821.              skipped by not specifying a variable, just a comma.
  822.  
  823.  
  824.  
  825. Example 5.0 :
  826.    private qname,server,formfeed,notab,banner,tabsize,printer,;
  827.         copies,form,bannertext,lpt,timeout,autoend,formname
  828.    store 0 to qname,server,formfeed,notab,banner,tabsize,printer,;
  829.         copies,form,bannertext,lpt,timeout,autoend,formname
  830.    cap_flags(1,@qname,@server,@formfeed,@notab,@banner,@tabsize,@printer,;
  831.         @copies,@form,@bannertext,@lpt,@timeout,@autoend,@formname)
  832.    @ 10,10 say 'Current capture is to the server '+server+;
  833.                if(len(qname)!=0,', Queue '+qname,',' Printer '+str(printer,1))
  834.    @ 11,10 say 'Form #   :'+str(form,3)
  835.    @ 11,40 say 'Tabs     :'+if(notab,'Not converted','Converted to '+;
  836.                str(tabsize,3)+' spaces')
  837.    @ 12,10 say 'Copies   :'+str(copies,3)
  838.    @ 12,40 say 'FormFeed :'+if(formfeed,'On','Off')
  839.    @ 13,10 say 'Time out :'+if(timeout=0,'None',str(timeout,5))
  840.    @ 13,40 say 'Auto End :'+if(autoend,'On','Off')
  841.    @ 14,10 say 'Banner   :'+if(banner,bannertext,'None')
  842.    wait
  843.  
  844. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     18
  845.  
  846. Function    :Cap_Server
  847.  
  848. Compatible  :S87,5.0
  849.  
  850. Syntax      :n_var=Cap_Server(LPT_Port)
  851.  
  852. Description :Cap_Server will return the server slot # of the server that
  853.              the specified LPT capture is going to.
  854.  
  855.  
  856. Example 5.0 :private servers[8]  &&8 is the max # of attached servers
  857.              a_servers[servers]
  858.              if !cap_status(1)
  859.                 ? 'LPT1 capturing server is '+servers[cap_server()]
  860.              else
  861.                 ? 'Capture for LPT1 is not active'
  862.              endif
  863.  
  864.  
  865. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     19
  866. Function    :Cap_Status
  867.  
  868. Compatible  :S87,5.0
  869.  
  870. Syntax      :l_var=Cap_Status(LPT_Port)
  871.  
  872. Description :Cap_Status will return .t. if the specified capture lpt port
  873.              is captured, .f. if no capture is active.
  874.  
  875.  
  876. Example 5.0 :if !cap_status(1)
  877.                 capture('qlaser ti0 nff')
  878.              endif
  879.  
  880.  
  881.  
  882.  
  883. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     20
  884.  
  885. Function    :Capture
  886.  
  887. Compatible  :S87, 5.0
  888.  
  889. Syntax      :Capture(option_string)
  890.  
  891. Description :Capture will end the current capture and start a new one
  892.              using the options specified in option_string.  Options
  893.              available are:
  894.  
  895.                  /q=<queue name>
  896.                  /b=<banner name>
  897.                  /ti=<timeout value in seconds>
  898.                  /t=<tab replacement value (number of spaces)>
  899.                  /ff formfeed after capture
  900.                  /nff no formfeed after capture
  901.                  /p=<server printer (0-4)>
  902.                  /l=<LPT port number (1-3)
  903.                  /f=<form number or form name>
  904.                  /nam=<banner user name>
  905.                  /a auto endcap (endcap when job is done)
  906.                  /na no auto endcap
  907.                  /c=<copies>
  908.                  /nt no tab expansion
  909.  
  910.              The / and the = are optional, all options must be seperated
  911.              by a space though.  If you specify a queue name, you shouldn't
  912.              specify a server printer number.  Specifing conflicting options
  913.              (such as both /a and /na) will have unpredictable results.  The
  914.              banner name, queue name, and the form name cannot have any
  915.              spaces in them
  916.  
  917. Example     :capture('/q=laser2 /ti=0 /nb /nt /l=2 /bBal_stmnt ff')  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     21
  926.  
  927. Function    :ConnectNum
  928.  
  929. Compatible  :S87, 5.0
  930.  
  931. Syntax      :n_var=ConnectNum()
  932.  
  933. Description :ConnectNum returns the Novell connection number (1-250) of the
  934.              workstation making the call on the default file server.  This 
  935.              number is unique to the station on the default file server.
  936.              The connection number is often useful in generating unique
  937.              filenames for temporary files.  This number is determined by
  938.              the file server and can change for the workstation when the
  939.              station is powered down (although Novell will try to reserve
  940.              the same number for the station).
  941.  
  942.  
  943. Example     :tmpfilename='TMP'+ltrim(str(connectnum()))
  944.              use customer index customer
  945.              copy to (tmpfilename) for state='MN'
  946.  
  947.  
  948. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     22
  949.  
  950. Function    :Cur_Drive
  951.  
  952. Compatible  :S87,5.0
  953.  
  954. Syntax      :c_var=Cur_Drive()
  955.  
  956. Description :Cur_Drive will return the current disk drive including the
  957.              colon.
  958.  
  959. Example 5.0 :if cur_drive()<>'G:'
  960.                 set default to G:
  961.              endif
  962.  
  963.  
  964. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     23
  965.  
  966. Function    :Cur_Vol
  967.  
  968. Compatible  :S87,5.0
  969.  
  970. Syntax      :c_var=Cur_Vol()
  971.  
  972. Description :Cur_Vol will return the volume name of the default disk drive 
  973.              including the the trailing colon.
  974.  
  975. Example 5.0 :if getrights(cur_vol()+'.')!='RWOCD'
  976.                 @ 10,10 say 'You do not have enough rights to this directory'
  977.              endif
  978.  
  979.  
  980. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     24
  981.  
  982. Function    :DefaultLPT
  983.  
  984. Compatible  :S87, 5.0
  985.  
  986. Syntax      :n_var=DefaultLpt()
  987.  
  988. Description :DefaultLPT will return the default LPT number (1-3) used
  989.              with the capture command.
  990.                                        
  991. Example     :if defaultlpt()<>2
  992.                 set printer to LPT2
  993.              endif
  994.  
  995.  
  996. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     25
  997.  
  998. Function    :DefaultCon
  999.  
  1000. Compatible  :S87, 5.0
  1001.  
  1002. Syntax      :n_var=DefaultCon()
  1003.  
  1004. Description :DefaultCon will return the preferred connection ID number (1-8)
  1005.              that correspondse with the server list.  This function is used
  1006.              to get the preferred server number when multiple servers are
  1007.              available.  Defaultcon will return 0 if no preferred server
  1008.              is set.
  1009.  
  1010.              How the active server is determined:
  1011.  
  1012.              1) if the server is specified in the function, that
  1013.                 server will be used.
  1014.  
  1015.              2) if no server is specified, the preferred server (if
  1016.                 set) will be used.
  1017.  
  1018.              3) if no server is specified and no preferred server
  1019.                 is set, the server that the current drive
  1020.                 (if networked) is logged into is used
  1021.  
  1022.              4) if no server is specified, no preferred server is set,
  1023.                 and the current drive is not a network drive, then the
  1024.                 primary server is used (the primary server is the server
  1025.                 that the user logged into).
  1026.  
  1027.              5) finally, if the primary server connection is lost, the
  1028.                 first server in the server table is used.
  1029.  
  1030.  
  1031. Example     :&&to capture to a non-preferred (if available)
  1032.              private servers[numservers()]
  1033.              a_servers(servers)
  1034.              if ascan(servers,'SERVER-2')<>0
  1035.                 oldserver=defaultcon()
  1036.                 setdefcon(ascan(servers,'SERVER-2'))
  1037.                 capture('qlaser nb ti0 nt')
  1038.                 setdefcon(oldserver)
  1039.              else
  1040.                 capture('qokidata_3 nb ti0 nt')
  1041.              endif
  1042.  
  1043.  
  1044.  
  1045.  
  1046. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     26
  1047.  
  1048. Function    :Detach
  1049.  
  1050. Compatible  :S87,5.0
  1051.  
  1052. Syntax      :l_var=Detach(Server_Number)
  1053.  
  1054. Description :Detach will remove a server from the connection ID table
  1055.              (see Attach() for description of connection ID table).
  1056.              This function will most likely be used if you need
  1057.              to connect to a server and the connection ID table is
  1058.              full.  It may be good practice to detach from a server when
  1059.              you log out from a server if you anticipate that you may
  1060.              run out of server slots in the connection ID table.  Detach()
  1061.              will return .t. if successful, .f. if server was not attached.
  1062.  
  1063.  
  1064. Example     :function my_logout
  1065.                 parameters servername
  1066.                 private serv_num,servers[8]
  1067.                 a_servers(servers)
  1068.                 serv_num=ascan(servers,servername)
  1069.                 if serv_num>0
  1070.                    logout(serv_num)
  1071.                    if serv_num>1   &&should always leave one server attached
  1072.                       detach(serv_num)
  1073.                    endif
  1074.                 endif
  1075.              return .t.
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     27
  1082.  
  1083. Function    :EndCap
  1084.  
  1085. Compatible  :S87, 5.0
  1086.  
  1087. Syntax      :l_var=EndCap()
  1088.  
  1089. Description :EndCap will end and release the capture for the default LPT
  1090.              port.  L_var will return .t. if successfull, otherwise .f.
  1091.  
  1092.  
  1093. Example     :capture('qlaser nt nb ff')
  1094.              *print report
  1095.              endcap()
  1096.  
  1097.  
  1098.  
  1099.  
  1100. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     28
  1101.  
  1102. Function    :EndSpecCap
  1103.  
  1104. Compatible  :S87, 5.0
  1105.  
  1106. Syntax      :l_var=EndSpecCap(lptport)
  1107.  
  1108. Description :EndSpecCap will end and release the capture for the specified
  1109.              LPT port.  L_var will return .t. if successfull, otherwise .f.
  1110.  
  1111.  
  1112. Example     :capture('qlaser nt nb ff l2')
  1113.              *print report
  1114.              endspeccap(2)
  1115.  
  1116.  
  1117.  
  1118.  
  1119. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     29
  1120.  
  1121. Function    :FlushCap
  1122.  
  1123. Compatible  :S87, 5.0
  1124.  
  1125. Syntax      :l_var=FlushCap()
  1126.  
  1127. Description :FlushCap will release the capture for the default LPT port.  
  1128.              A new capture with the same parameters will be issued for
  1129.              the LPT port.  L_var will return .t. if successfull, otherwise 
  1130.              .f.
  1131.  
  1132.  
  1133. Example     :capture('qlaser nt nb ff')
  1134.              *print report
  1135.              flushcap()
  1136.              *print another report
  1137.              endcap()
  1138.  
  1139.  
  1140.  
  1141.  
  1142. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     30
  1143.  
  1144. Function    :FluSpecCap
  1145.  
  1146. Compatible  :S87, 5.0
  1147.  
  1148. Syntax      :l_var=FluSpecCap(lptport)
  1149.  
  1150. Description :FluSpecCap will release the capture for the specified LPT port.  
  1151.              A new capture with the same parameters will be issued for
  1152.              the LPT port.  L_var will return .t. if successfull, otherwise 
  1153.              .f.
  1154.  
  1155.  
  1156. Example     :capture('qlaser nt nb ff l2')
  1157.              *print report
  1158.              fluspeccap(2)
  1159.              *print another report
  1160.              endcap(2)
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     31
  1167.  
  1168. Function    :GetBanUser
  1169.  
  1170. Compatible  :S87, 5.0
  1171.  
  1172. Syntax      :c_var=GetBanUser()
  1173.  
  1174. Description :GetBanUser will return the banner user name that prints on the
  1175.              banner page of captured printouts.  Use the Capture command to
  1176.              set the banner user name.
  1177.  
  1178.  
  1179. Example     :buser=getbanuser()
  1180.              capture('qlaser nt ff b'+trim(left(buser,5))+'_AP')
  1181.  
  1182.  
  1183.  
  1184. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     32
  1185.  
  1186. Function    :GetLogCont
  1187.  
  1188. Compatible  :S87, 5.0
  1189.  
  1190. Syntax      :GetLogCont(UserName                             /*string */
  1191.                         @Account_Disabled,;                  /*logical*/
  1192.                         @Account_Expires,;                   /*date   */
  1193.                         @Concurrent_Connection_Limit,;       /*numeric*/
  1194.                         @User_Can_Change_Password,;          /*logical*/
  1195.                         @User_Password_Required,;            /*logical*/
  1196.                         @Minimum_Password_Length,;           /*numeric*/
  1197.                         @Force_Periodic_Password_Change,;    /*logical*/
  1198.                         @Days_Between_Password_Change,;      /*numeric*/
  1199.                         @Date_Current_Password_Changes,;     /*date   */
  1200.                         @Grace_Logins_Permitted,;            /*numeric*/
  1201.                         @Grace_Logins_Left,;                 /*numeric*/
  1202.                         @Require_Unique_Passwords)           /*logical*/
  1203.  
  1204. Description :GetLogCont will return the login control for the specified
  1205.              user.  The login control for a user is stored in the
  1206.              bindery file under the object for the user.  The values are
  1207.              stored in the property value LOGIN_CONTROL.  All parameters
  1208.              are required but depending on the values retreived from the
  1209.              bindery, some may have no meaning.
  1210.                 If the account is disabled, all other values are meaningless.
  1211.              The maxinum concurrent connections will be 0 if no limit is
  1212.              set.  If a password is not required, minimum_password_length,
  1213.              forced_periodic_password_change, days_between_password_change,
  1214.              Date_current_password_changes,grace_logins_permitted, and
  1215.              grace_logins_left will have no meaning.  If the 
  1216.              grace_logins_permitted is 0, there is an unlimited # of grace
  1217.              logins and the grace_logins_left is meaningless.
  1218.  
  1219. Example     : (see next page)
  1220.  
  1221. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     33
  1222.  
  1223. Function    :GetLogCont  (continued)
  1224.  
  1225. function useracctre
  1226.    private disabled,acctexpire,connlimit,userpw,pwreq,pwlen,pwchng,;
  1227.            pwdays,pwexpire,grace,graceleft,pwunique
  1228.    getlogcont(users[pcurrow],@disabled,@acctexpire,@connlimit,@userpw,@pwreq,@pwlen,;
  1229.               @pwchng,@pwdays,@pwexpire,@grace,@graceleft,@pwunique)
  1230.    @ 5,10,7,70 box  '╔═╗║╣═╠║ '
  1231.    @ 7,10,23,70 box '╠═╣║╝═╚║ '
  1232.    @ 6,16 say 'Account Restrictions For User '+users[pcurrow]
  1233.    @ 08,12 say 'Account Disabled:'
  1234.    @ 09,12 say 'Account Has Expriation Date:'
  1235.    @ 10,12 say '   Date Account Expires:'
  1236.    @ 11,12 say 'Limit Concurrent Connections:'
  1237.    @ 12,12 say '   Maximum Connections:'
  1238.    @ 13,12 say 'Allow User to Change Password:'
  1239.    @ 14,12 say 'Require Password:'
  1240.    @ 15,12 say '   Minimum Password Length:'
  1241.    @ 16,12 say 'Force Periodic Password Change:'
  1242.    @ 17,12 say '   Days Between Forced Change:'
  1243.    @ 18,12 say '   Date Password Expires:'
  1244.    @ 19,12 say '   Limit Grace Logins:'
  1245.    @ 20,12 say '      Grace Logins Allowed:'
  1246.    @ 21,12 say '      Remaining Grace Logins:'
  1247.    @ 22,12 say 'Require Unique Passwords:'
  1248.    @ 08,45 say if(disabled,'No','Yes')
  1249.    @ 09,45 say if(acctexpire=ctod('  /  /  '),'No','Yes')
  1250.    @ 10,45 say if(acctexpire=ctod('  /  /  '),'',acctexpire)
  1251.    @ 11,45 say if(connlimit=0,'No','Yes')
  1252.    @ 12,45 say if(connlimit=0,'',str(connlimit,3,0))
  1253.    @ 13,45 say if(userpw,'Yes','No')
  1254.    @ 14,45 say if(pwreq,'Yes','No')
  1255.    @ 15,45 say if(pwreq,str(pwlen,3),'')
  1256.    @ 16,45 say if(pwchng,'Yes','No')
  1257.    @ 17,45 say if(pwchng,str(pwdays,3),'')
  1258.    @ 18,45 say if(pwchng,pwexpire,'')
  1259.    @ 19,45 say if(pwchng,if(grace=0,'No','Yes'),'')
  1260.    @ 20,45 say if(pwchng,if(grace=0,'',str(grace,3)),'')
  1261.    @ 21,45 say if(pwchng,if(grace=0,'',str(graceleft,3)),'')
  1262.    @ 22,45 say if(pwunique,'Yes','No')
  1263.    wait''
  1264. return .t.
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     34
  1271.  
  1272. Function    :GetMap
  1273.  
  1274. Compatible  :S87,5.0
  1275.  
  1276. Syntax      :c_var=GetMap(DriveLetter)
  1277.  
  1278. Description :GetMap will return the current path for DriveLetter.  If
  1279.              the drive letter is invalid or the drive is not mapped,
  1280.              GetMap will return a zero length string.  The entire path
  1281.              including the volume name is returned without the trailing \.
  1282.  
  1283.  
  1284. Example     :if getmap('G')<>'VOL1:\ORDER'
  1285.                 oldmapg:=getmap('G')
  1286.                 map('G','VOL1:\ORDER')
  1287.              endif
  1288.  
  1289.  
  1290. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     35
  1291.  
  1292. Function    :GetObjID
  1293.  
  1294. Compatible  :S87, 5.0
  1295.  
  1296. Syntax      :n_var=GetObjID(obj_type,obj_name)
  1297.  
  1298. Description :Novell's bindery consist of entirely of objects.  Each object
  1299.              has an object type (either user, group, queue, etc.) and
  1300.              one or more properties.  The properties can have either a value
  1301.              or a set of values.  For a user, the object will have 
  1302.              properties for the user_name (just a value), a property for
  1303.              the groups the user belongs to (a set of values) and gobs of
  1304.              other properties for the user.  Each object can be 
  1305.              identified by either it's object ID number or by its name and
  1306.              the type.  It is often useful to know the object ID of an 
  1307.              object such as a print queue (if you desire to write your
  1308.              own capture, or something) but all of the LXNet functions
  1309.              use names and types.  The GetObjID is used mostly internally
  1310.              by functions to convert from name to object ID for you.
  1311.  
  1312.              Object Types:
  1313.             FFFFh   wildcard
  1314.                 0   Unknown
  1315.                 1   User
  1316.                 2   User Group
  1317.                 3   Print Queue
  1318.                 4   File Server
  1319.                 5   Job Server
  1320.                 6   Gateway
  1321.                 7   Print Server
  1322.                 8   Archive Queue
  1323.                 9   Archive Server
  1324.                 Ah  Job Queue
  1325.                 Bh  Administration
  1326.                26h  Remote Bridge Server
  1327.                47h  Advertising Print Server
  1328.         thru 8000h Reserved
  1329.         (See lxnet.ch for object type constants)
  1330.  
  1331. Example     :maildir='\mail\'+makehex(getobjid(1,whoami()))
  1332.              if !file(maildir+'\*.ML')
  1333.                 ? 'no mail in you mail directory'
  1334.              endif
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     36
  1341.  
  1342. Function    :GetObjName
  1343.  
  1344. Compatible  :S87, 5.0
  1345.  
  1346. Syntax      :c_var=GetObjName(objectid)
  1347.  
  1348. Description :GetObjName will return the name of an Object ID (see GetObjID 
  1349.              for description of Object ID's).  This function is used
  1350.              internally for the most part but can be called by clipper if
  1351.              needed.
  1352.  
  1353.  
  1354. Example     :? GetObjName(GetObjID(2,'EVERYONE'))
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     37
  1361.  
  1362. Function    :GetObjType
  1363.  
  1364. Compatible  :S87, 5.0
  1365.  
  1366. Syntax      :n_var=GetObjType(objectid)
  1367.  
  1368. Description :GetObjType will return the type of an Object ID (see GetObjID 
  1369.              for description of Object ID's).  This function is used
  1370.              internally for the most part but can be called by clipper if
  1371.              needed.
  1372.  
  1373.  
  1374. Example     :if GetObjType(GetObjID(find_object))=2
  1375.                 ? find_object+' is a group'
  1376.              else
  1377.                 ? find_object+' not is a group'
  1378.              endif
  1379.  
  1380.  
  1381. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     38
  1382.  
  1383. Function    :GetRights
  1384.  
  1385. Compatible  :S87,5.0
  1386.  
  1387. Syntax      :c_var=GetRights(Path)
  1388.  
  1389. Description :GetRights will return the effective access rights for the
  1390.              specified directory.  The Path must include the volume name
  1391.              (use Cur_Vol() to get current volume, or GetMap() to get the
  1392.              volume name of any other drive).  The access rights
  1393.              are returned as a character string with a length of eight.
  1394.              Each position in the string represent a right with the 
  1395.              following format:
  1396.                   RWOCDPSM
  1397.  
  1398.                   R=Read Rights
  1399.                   W=Write Rights
  1400.                   O=Open Rights
  1401.                   C=Close Rights
  1402.                   D=Delete Rights
  1403.                   P=Parental Rights
  1404.                   S=Search Rights
  1405.                   M=Modify Rights
  1406.  
  1407.              Typical return values might be
  1408.                  RWOC  S
  1409.                  R OC  S
  1410.                  RWOCD
  1411.                  RWOCDPSM
  1412.  
  1413. Example 5.0 :if getrights(cur_vol()+'.')!='RWOCD'
  1414.                 @ 10,10 say 'You do not have enough rights to this directory'
  1415.              endif
  1416.  
  1417. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     39
  1418.  
  1419. Function    :GetUser
  1420.  
  1421. Compatible  :S87,5.0
  1422.  
  1423. Syntax      :c_var=GetUser(Connection_Number)
  1424.  
  1425. Description :GetUser will return the object name logged into the connection
  1426.              number Connection_Number.
  1427.  
  1428.  
  1429. Example 5.0 :
  1430.    &&this function is already included in LXNET5, I'm just using
  1431.    &&it here as an example for getuser()
  1432.    function a_connect 
  1433.       parameters _varray
  1434.       private i,n
  1435.       n=0
  1436.       asize(_varray,0)
  1437.       if isnovell()
  1438.          for i=1 to 250  &&250 for Netware 3.x compatibility
  1439.             if !(getuser(i)=='')
  1440.                aadd(_varray,'')
  1441.                _varray[n+1]=str(i,3)+' '+getuser(i)
  1442.                n=n+1
  1443.             endif
  1444.          next
  1445.       endif
  1446.    return n
  1447.  
  1448.                                                                          
  1449. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     40
  1450.  
  1451. Function    :IsInGroup
  1452.  
  1453. Compatible  :S87, 5.0
  1454.  
  1455. Syntax      :l_var=IsInGroup(username,groupname)
  1456.  
  1457. Description :IsInGroup will return a true if username is a member of
  1458.              groupname.  This function is useful for setting up
  1459.              module security based on Novell's groups.
  1460.  
  1461.  
  1462. Example     :if IsInGroup(WhoAmI(),'ADMINISTRATION')
  1463.                 FinReport()
  1464.              else
  1465.                 ? 'You do not have rights to print financial reports'
  1466.              endif
  1467.  
  1468.  
  1469. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     41
  1470.  
  1471. Function    :IsNovell
  1472.  
  1473. Compatible  :S87, 5.0
  1474.  
  1475. Syntax      :l_var=IsNovell()
  1476.  
  1477. Description :IsNovell returns .t. if the Novell Shell is loaded.
  1478.  
  1479.  
  1480. Example     :if isnovell()
  1481.                 capture('qlaser nb ti10')
  1482.              endif
  1483.              set device to print
  1484.              *print report
  1485.              set device to screen
  1486.              if isnovell()
  1487.                 endcap()
  1488.              endif
  1489.  
  1490.  
  1491.  
  1492.  
  1493. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     42
  1494.  
  1495. Function    :Login
  1496.  
  1497. Compatible  :S87,5.0
  1498.  
  1499. Syntax      :l_var=Login(ObjectName,Password[,Object_Type])
  1500.  
  1501. Description :Login will log an object into an attached server.  The server
  1502.              must be attached (with Attach() or previously logged into) and
  1503.              be selected as the preferred server (using SetDefCon()).
  1504.              ObjectName is the user or printserver name, password must
  1505.              be passed, if the object doesn't have a password, pass an
  1506.              empty string.  If Object_Type is not passed, a user object type
  1507.              is assumed.
  1508.  
  1509.  
  1510. Example 5.0 :#include "lxnet.ch"
  1511.              function my_login
  1512.                 parameters servername,username,password
  1513.                 private server_num,old_server,flag
  1514.                 flag=.t.
  1515.                 password=if(type('password')='U','',password)
  1516.                 server_num=attach(servername)
  1517.                 if server_num<9
  1518.                    old_server=defalutcon()
  1519.                    setdefcon(server_num)
  1520.                    if !login(username,password,USER_OBJECT)
  1521.                       popmess(10,10,'Login failed')
  1522.                       flag=.f.
  1523.                    endif
  1524.                    setdefcon(old_server)
  1525.                 else
  1526.                    popmess(10,10,'Login failed')
  1527.                    flag=.f.
  1528.                 endif
  1529.              return flag
  1530.  
  1531.  
  1532. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     43
  1533.  
  1534. Function    :Logout
  1535.  
  1536. Compatible  :S87,5.0
  1537.  
  1538. Syntax      :=Logout(Server_Number)
  1539.  
  1540. Description :Logout will log an object out of the specified server but
  1541.              leave the server attached.  All drive mappings to the
  1542.              server will be removed by the shell.  Logout does not
  1543.              return a value.
  1544.  
  1545.  
  1546. Example 5.0 :function my_logout
  1547.                 parameters servername
  1548.                 private serv_num,servers[0]
  1549.                 a_servers(servers)
  1550.                 serv_num=ascan(servers,servername)
  1551.                 if serv_num>0
  1552.                    logout(serv_num)
  1553.                    if serv_num>1
  1554.                       detach(serv_num)
  1555.                    endif
  1556.                 endif
  1557.              return .t.
  1558.  
  1559.  
  1560.  
  1561. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     44
  1562.  
  1563. Function    :Map
  1564.  
  1565. Compatible  :S87,5.0
  1566.  
  1567. Syntax      :l_var=Map(Drive_Letter,New_Path)
  1568.  
  1569. Description :Map will assign Drive_Letter to New_Path.  The Drive_Letter
  1570.              must be A..Z.  New_Path may include a volume name but not 
  1571.              a server name, only the primary server will be used.  To 
  1572.              map to a non-primary server, use SetDefCon() to set the 
  1573.              primary server.  Map will return a status flag with the 
  1574.              following values:
  1575.                               0 successfull
  1576.                               1 invalid parameters
  1577.                             98h volume not found
  1578.                             9Ch invalid path
  1579.  
  1580.  
  1581. Example 5.0 :function OpenGLTRS
  1582.                 local status,errorflag
  1583.                 errorflag:=.f.
  1584.                 status:=map('M','ACCT:\AM\SIS3')
  1585.                 if status<>0
  1586.                    popmess(10,10,'Accounting directory not found')
  1587.                    errorflag:=.t.
  1588.                 endif
  1589.                 if !errorflag
  1590.                    usefile('GLTRS','M:GLTRS'+G_compno,'M:GLTRS'+G_compno+'.NTX')
  1591.                 endif
  1592.              return !errorflag
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     45
  1600.  
  1601. Function    :NumConnect
  1602.  
  1603. Compatible  :S87, 5.0
  1604.  
  1605. Syntax      :n_var=NumConnect()
  1606.  
  1607. Description :NumConnect returns the number of users logged into the default
  1608.              file server.
  1609.  
  1610.  
  1611. Example     :private conns[NumConnect()]
  1612.              A_Connect(conns)
  1613.              for i=1 to NumConnect()
  1614.                 ? conns[i]
  1615.              next
  1616.  
  1617.  
  1618. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     46
  1619.  
  1620. Function    :NumGroups
  1621.  
  1622. Compatible  :S87, 5.0
  1623.  
  1624. Syntax      :n_var=NumGroups()
  1625.  
  1626. Description :NumGroups returns the number of groups in the bindery.
  1627.              It is usually used in conjunction with A_Groups().
  1628.  
  1629.  
  1630. Example     :public groups[NumGroups()]
  1631.              A_Groups(groups)
  1632.              for i=1 to NumGroups()
  1633.                 ? groups[i]
  1634.              next
  1635.  
  1636.  
  1637. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     47
  1638.  
  1639. Function    :NumMembers
  1640.  
  1641. Compatible  :S87, 5.0
  1642.  
  1643. Syntax      :n_var=NumMembers(groupname)
  1644.  
  1645. Description :NumMembers returns the number of members in groupname.
  1646.              It is usually used in conjunction with A_Members().
  1647.  
  1648.  
  1649. Example     :public members[NumMembers('EVERYONE')]
  1650.              A_Members(members,'EVERYONE')
  1651.              for i=1 to NumMembers('EVERYONE')
  1652.                 ? members[i]
  1653.              next
  1654.  
  1655. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     48
  1656.  
  1657. Function    :NumQueues
  1658.  
  1659. Compatible  :S87, 5.0
  1660.  
  1661. Syntax      :n_var=NumQueues()
  1662.  
  1663.             :NumQueues returns the number of print queues for the default 
  1664.              file server.  It is usually used in conjunction with A_Queues().
  1665.  
  1666.  
  1667. Example     :public queues[NumQueues()]
  1668.              A_Queues(queues)
  1669.              for i=1 to NumQueues()
  1670.                 ? queues[i]
  1671.              next
  1672.  
  1673.  
  1674. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     49
  1675.  
  1676. Function    :NumServers
  1677.  
  1678. Compatible  :S87, 5.0
  1679.  
  1680. Syntax      :n_var=NumServers()
  1681.  
  1682.             :NumServers returns the number of servers that are reporting to
  1683.              the workstation.  It is usually used in conjunction with 
  1684.              A_Servers().
  1685.  
  1686.  
  1687. Example     :public servers[NumServers()]
  1688.              A_Servers(servers)
  1689.              for i=1 to NumServers()
  1690.                 ? servers[i]
  1691.              next
  1692.  
  1693. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     50
  1694.  
  1695. Function    :NumSList
  1696.  
  1697. Compatible  :S87, 5.0
  1698.  
  1699. Syntax      :n_var=NumSList()
  1700.  
  1701. Description :NumSList returns the number of servers not attached.
  1702.  
  1703.  
  1704. Example     :private not_logged[NumSList()]
  1705.              SList(Not_logged)
  1706.              for i=1 to NUmSList()
  1707.                 ? Not_Logged[i]
  1708.              next
  1709.  
  1710.  
  1711. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     51
  1712.  
  1713. Function    :NumUsers
  1714.  
  1715. Compatible  :S87, 5.0
  1716.  
  1717. Syntax      :n_var=NumUsers()
  1718.  
  1719. Description :NumUsers returns the number of users for the default file
  1720.              server.  It is usually used in conjunction with A_Users().
  1721.  
  1722.  
  1723. Example     :public users[NumUsers()]
  1724.              A_Users(users)
  1725.              for i=1 to NumUsers()
  1726.                 ? users[i]
  1727.              next
  1728.  
  1729.  
  1730. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     52
  1731.  
  1732. Function    :NumVolumes
  1733.  
  1734. Compatible  :S87, 5.0
  1735.  
  1736. Syntax      :n_var=NumVolumes()
  1737.  
  1738. Description :NumVolumes returns the number of volumes for the default file
  1739.              server.  It is usually used in conjunction with A_Volumes().
  1740.  
  1741.  
  1742. Example     :public volumes[NumVolumes()]
  1743.              A_Volumes(users)
  1744.              for i=1 to NumVolumes()
  1745.                 ? volumes[i]
  1746.              next
  1747.  
  1748.  
  1749.  
  1750. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     53
  1751.  
  1752. Function    :SecurEquiv
  1753.  
  1754. Compatible  :S87, 5.0
  1755.  
  1756. Syntax      :l_var=SecurEquiv(username,objectname)
  1757.  
  1758. Description :SecurEquiv will return true if username has the security
  1759.              equivilance as objectname.  Objectname can be either a
  1760.              user or a group.
  1761.  
  1762.  
  1763. Example     :if SecurEquiv(WhoAmI(),'SUPERVISOR')
  1764.                 maint_menu()
  1765.              else
  1766.                 ? 'Must be Supervisor to run maintenance'
  1767.              endif
  1768.  
  1769. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     54
  1770.  
  1771. Function    :Send
  1772.  
  1773. Compatible  :S87,5.0
  1774.  
  1775. Syntax      :n_var=Send(Connection_Number,Message)
  1776.  
  1777. Description :Send will send a broadcast message to logical connection number
  1778.              Connection_Number.  Connection_Number is a value between 1 and
  1779.              100 (Netware 2.x) and 1 to 250 (3.x).  Message has a maximum
  1780.              length of 55 characters.  You may use A_Connect() to get the
  1781.              connection number of all users logged in or GetUser() to get
  1782.              the user of a connection number.  Send will return 0 if no 
  1783.              error has occurred or an error code as follows:
  1784.  
  1785.                   0xFC   Message rejected  (message already waiting for
  1786.                          the target connection)
  1787.  
  1788.                   0xFD   Invalid connection number (specified connection
  1789.                          is not known)
  1790.  
  1791.                   0xFF   Message blocked (The target connection has castoff
  1792.                          or the connection is not in use)
  1793.  
  1794. Example S87 :
  1795.    function my_send
  1796.       private message,mscrn,connects[numconnect()+1],i,status,gets
  1797.       mscrn=savescreen(10,10,12,70)
  1798.       message=space(54-len(whoami()))
  1799.       a_connect(connects)
  1800.       @ 10,10 to 12,70
  1801.       @ 11,11 clear to 11,69
  1802.       *n_savegets(gets)   &&if you have Communications Horizons GET-IT!
  1803.       @ 11,11 say 'Message:' get message
  1804.       read
  1805.       *n_restgets(gets)   &&if you have Communications Horizons GET-IT!
  1806.       restscreen(10,10,12,70,mscrn)
  1807.       if lastkey()=27
  1808.          return .t.
  1809.       endif
  1810.       mscrn=savescreen(10,10,20,40)
  1811.       @ 10,10 to 20,40
  1812.       do while .t.
  1813.          @ 11,11 clear to 19,39
  1814.          i=achoice(11,11,19,39,connects)
  1815.          if i=0
  1816.             exit
  1817.          endif
  1818.          status=send(val(left(connects[i],3)),whoami()+':'+message)
  1819.          if status=0
  1820.             adel(connects,i)
  1821.          else
  1822.             popmess(10,10,'Error sending to '+connects[i])
  1823.          endif
  1824.          if len(connects)=0
  1825.             exit
  1826.          endif
  1827.       enddo
  1828.       restscreen(10,10,20,40,mscrn)
  1829.    return .t.
  1830.  
  1831.  
  1832. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     55
  1833.  
  1834. Function: Send (continued)
  1835. Example 5.0 :
  1836.    function my_send
  1837.       private message,mscrn,getlist[0],connects[0],i,status,gets
  1838.       mscrn=savescreen(10,10,12,70)
  1839.       message=space(54-len(whoami()))
  1840.       a_connect(connects)
  1841.       @ 10,10 to 12,70
  1842.       @ 11,11 clear to 11,69
  1843.       @ 11,11 say 'Message:' get message
  1844.       read
  1845.       restscreen(10,10,12,70,mscrn)
  1846.       if lastkey()=27
  1847.          return .t.
  1848.       endif
  1849.       mscrn=savescreen(10,10,20,40)
  1850.       @ 10,10 to 20,40
  1851.       do while .t.
  1852.          @ 11,11 clear to 19,39
  1853.          i=achoice(11,11,19,39,connects)
  1854.          if i=0
  1855.             exit
  1856.          endif
  1857.          status=send(val(left(connects[i],3)),whoami()+':'+message)
  1858.          if status=0
  1859.             adel(connects,i)
  1860.             asize(connects,len(connects)-1)
  1861.          else
  1862.             popmess(10,10,'Error sending to '+connects[i])
  1863.          endif
  1864.          if len(connects)=0
  1865.             exit
  1866.          endif
  1867.       enddo
  1868.       restscreen(10,10,20,40,mscrn)
  1869.    return .t.
  1870.  
  1871.  
  1872. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     56
  1873.  
  1874. Function    :ServDate
  1875.  
  1876. Compatible  :S87, 5.0
  1877.  
  1878. Syntax      :d_var=ServDate()
  1879.  
  1880. Description :ServDate will return the server date in clipper date format.
  1881.              Server date and times are not synchronized on an inter-
  1882.              network, so the server date will come from the default file
  1883.              server.  Use SetDefCon() to designate which server to get
  1884.              the date (or time) from if you have multiple servers available.
  1885.              Any year before 1980 is assumed to be in the 21st century.
  1886.  
  1887.  
  1888. Example     :replace accessdate with servdate()
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     57
  1896.  
  1897. Function    :ServTime
  1898.  
  1899. Compatible  :S87, 5.0
  1900.  
  1901. Syntax      :c_var=ServTime()
  1902.  
  1903. Description :ServTime will return the server time in clipper 99:99:99 
  1904.              character format. Server date and times are not synchronized 
  1905.              on an internetwork, so the server time will come from the 
  1906.              default file server.  Use SetDefCon() to designate which 
  1907.              server to get the time (or date) from if you have multiple 
  1908.              servers available.
  1909.  
  1910.  
  1911. Example     :replace accesstime with servtime()
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     58
  1919.  
  1920. Function    :SetDefCon
  1921.  
  1922. Compatible  :S87, 5.0
  1923.  
  1924. Syntax      :SetDefCon(connection_ID)
  1925.  
  1926. Description :SetDefCon will set the preferred connection ID to the server
  1927.              in the connection_IDth slot in the server table.  The
  1928.              server table can be read with A_Servers.  All request to
  1929.              a server will go to the new preferred after this call.
  1930.              Setting the preferred connection ID to 0 will reset the
  1931.              preferred server to the first server on the list.
  1932.  
  1933.              *see DEFAULTCON() for description of server priority.
  1934.  
  1935.  
  1936. Example     :&&to capture to a non-preferred (if available)
  1937.              private servers(numservers())
  1938.              a_servers(servers)
  1939.              if ascan(servers,'SERVER-2')<>0
  1940.                 oldserver=defaultcon()
  1941.                 setdefcon(ascan(servers,'SERVER-2'))
  1942.                 capture('qlaser nb ti0 nt')
  1943.                 setdefcon(oldserver)
  1944.              else
  1945.                 capture('qokidata_3 nb ti0 nt')
  1946.              endif
  1947.  
  1948.  
  1949.  
  1950. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     59
  1951. Function    :SetDefLPT
  1952.  
  1953. Compatible  :S87,5.0
  1954.  
  1955. Syntax      :=l_var=SetDefLPT(LPT_Port)
  1956.  
  1957. Description :SetDefLPT is used to set the shell's default LPT port.  When
  1958.              requesting capture status, capture server and other information,
  1959.              the functions work on the shell's default LPT port.  LPT_Port
  1960.              is a value from 1 to 3 representing LPT1-LPT3.  SetDetLPT 
  1961.              returns .t. if successful.
  1962.  
  1963.  
  1964. Example 5.0 :set printer to LPT2
  1965.              setdeflpt(2)
  1966.              if !cap_stat()
  1967.                 capture('l2 qoki2410_1 ti0 nb nt')
  1968.              endif
  1969.  
  1970.  
  1971.  
  1972. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     60
  1973.  
  1974. Function    :SList
  1975.  
  1976. Compatible  :S87,5.0
  1977.  
  1978. Syntax      :n_var=SList(s_array)
  1979.  
  1980. Description :SList will fill the array s_array with the server names that
  1981.              the currently logged-in object is NOT attached to.  N_var will
  1982.              return the number of elements in s_array.  This function is
  1983.              generally used to get a list of servers that you may wish to
  1984.              attach to or log into.
  1985.  
  1986.  
  1987. Example     :private s_array[0]  &&5.0
  1988.              private s_array[numslist()]  &&S87
  1989.              a_servers(s_array)
  1990.              if ascan(s_array,'ACCT_SERV')=0  &&check if already attached
  1991.                 slist(s_array)                &&get list of unattached 
  1992.                                               &&servers
  1993.                 if ascan(s_array,'ACCT_SERV')<>0   
  1994.                                               &&check if server is there
  1995.                    if !(attach('ACCT_SERV',username,password))
  1996.                                               &&attempt attach to new server
  1997.                       popmess(10,10,;
  1998.                            'Could not attach to the Accounting Server')
  1999.                    endif
  2000.                 else
  2001.                    popmess(10,10,'Accounting Server could not be found')
  2002.                 endif
  2003.              endif
  2004.  
  2005.  
  2006.  
  2007. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     61
  2008.  
  2009. Function    :UserName
  2010.  
  2011. Compatible  :S87, 5.0
  2012.  
  2013. Syntax      :c_var=UserName([loginname])
  2014.  
  2015. Description :UserName returns the full name of the specified loginname or
  2016.              the user logged into the current workstation if no loginname
  2017.              is specified.
  2018.  
  2019.  
  2020.  
  2021.  
  2022. Example     :? 'Hello, '+UserName()
  2023.              ? username('RFP')
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029. LXNet Ver. 1.3/5.1 - Novell bindery/printing functions for Clipper     62
  2030.  
  2031. Function    :WhoAmI
  2032.  
  2033. Compatible  :S87, 5.0
  2034.  
  2035. Syntax      :c_var=WhoAmI()
  2036.  
  2037. Description :WhoAmI returns the name of the object logged into the
  2038.              workstation.  *Note*  It is not always a user logged into
  2039.              a workstation as print servers and job servers can also
  2040.              login to a workstation.
  2041.  
  2042.  
  2043.  
  2044.  
  2045. Example     :? 'Hello, '+WhoAmI()
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055.  
  2056.  
  2057.